<!--
  To change this template, choose Tools | Templates
  and open the template in the editor.
-->

<%@ page contentType="text/html;charset=UTF-8" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>${Inter.printOut('Delete employee from course',session.language)}</title>
    </head>
    <body>
        <div class="undernav">
            <span class="menuButton"><g:link class="" controller="course" action="show" id="${id}">${Inter.printOut('Back to Course',session.language)}</g:link></span>
        </div>
        <div class="body">
            <h1>${Inter.printOut('Delete employee from course',session.language)}</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <form name ="deleteEmployee" action="save_deleted_employee">
              <input type="hidden" name="id" value ="${id}"/>
              <table>
                  <thead>
                        <tr>
                            <th>
                              &nbsp;
                            </th>
                            <g:sortableColumn property="id" title="${Inter.printOut('Employee Id:',session.language)}" />
                            <g:sortableColumn property="name" title="${Inter.printOut('Name',session.language)}" />
                            <g:sortableColumn property="title" title="${Inter.printOut('Title',session.language)}" />
                        </tr>
                    </thead>
                    <tbody>

                    <g:each in="${employeeList}" status="i" var="employeeInstance">
                      <tr>
                        <td>
                          <input type="checkbox" name ="employeeid" value="${employeeInstance.id}" />
                        </td>
                        <td>
                          <g:link controller="employee" action="show" id="${employeeInstance.id}">${fieldValue(bean:employeeInstance, field:'employeeId')}</g:link>
                        </td>
                        <td>
                          <g:link controller="employee" action="show" id="${employeeInstance.id}">
                            ${fieldValue(bean:employeeInstance, field:'firstName')}
                            ${fieldValue(bean:employeeInstance, field:'lastName')}
                          </g:link>
                        </td>
                        <td>
                          <g:link controller="employee" action="show" id="${employeeInstance.id}">${fieldValue(bean:employeeInstance, field:'title')}</g:link>
                        </td>
                      </tr>
                    </g:each>
                   </tbody>
              </table>
               <div class="buttons">
                    <span class="button">
                        <g:submitButton class="delete_employee" value="${Inter.printOut('Remove Employee',session.language)}" name="Delete employee"/>
                    </span>
               </div>
            </form>
        </div>
  </body>
</html>
